import java.util.Scanner;

public class Test {
    public static void main12(String[] args) {
        Scanner sc = new Scanner(System.in);
        while(sc.hasNextInt()){
            int num = sc.nextInt();
            System.out.println(num);
        }

//        System.out.println();
//        System.out.print();
//        System.out.printf();
//        System.out.printf("%.2f%%",9.99f);
    }
    public static int hannuo(int n){
        if(n==1){
            return 1;
        }
        return (int)Math.pow(2,n-1)+hannuo(n-1);
    }
    public static void main11(String[] args) {
        System.out.println(hannuo(5));
    }

    public static int func3(int n){
        if(n == 1){
            return 1;
        }
        return n * func3(n-1);
    }
    public static void main9(String[] args) {
        System.out.println(func3(4));
    }

    public static int max2(int a, int b){
        if(a > b){
            return a;
        }
        return b;
    }
    public static double max2(double a, double b){
        if(a > b){
            return a;
        }
        return b;
    }

    public static double max3(double a, double b, double c){
        return max2(max2(a,b),max2(a,c));
    }

    public static void main8(String[] args) {
        System.out.println(max2(2, 3));
        System.out.println(max3(1.1, 5.0, 9.7));
    }


    public static int Add(int a,int b){
        return a + b;
    }
    public static double Add(double a,double b,double c){
        return a + b + c;
    }
    public static void main7(String[] args) {
        System.out.println(Add(3, 4));
        System.out.println(Add(0.1, 0.2, 0.3));
    }

    public static int febo(int n){
        if(n == 1 || n == 2){
            return 1;
        }
        int f1 = 1;
        int f2 = 1;
        int f3 = 1;
        for(int i = 3; i <= n; i++) {   //3
            f3 = f1 + f2;
            f1 = f2;
            f2 = f3;
        }
        return f3;
    }
    public static void main6(String[] args) {
        System.out.println(febo(10));
    }


    public static int funcn(int n){
        if(n == 1){
            return 1;
        }
        int sum =funcN(n) + funcN(n-1);
        return sum;
    }
    public static void main5(String[] args) {
        System.out.println(funcn(3));
    }

    public static int funcN(int N){
        if(N == 1){
            return 1;
        }
        return N*funcN(N-1);
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        System.out.println(funcN(N));
    }



    public static int max3(int a, int b, int c){
        return max2(max2(a,b),max2(a,c));
    }

    public static void main3(String[] args) {
        System.out.println(max2(2, 3));
        System.out.println(max3(5, 9, 4));
    }

    public static int func(int n){
        if(n < 10) {
            return n;
        }
        int sum =n % 10 + func(n / 10);
        return sum;
    }
    public static void main2(String[] args) {
        System.out.println(func(123));
    }

    public static void main1(String[] args) {
        Scanner sc = new Scanner(System.in);
        String pass = sc.nextLine();
        if(pass.equals("123456")){
            System.out.println("登录成功");
        }else{
            System.out.println("密码错误");
        }
    }
}
